package com.bjfu.demo.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bjfu.demo.dao.RpDataMapper;
import com.bjfu.demo.entity.RpData;
import com.bjfu.demo.entity.RpDataExample;
import com.bjfu.demo.service.RpDataService;

/**
 * @create 2019-12-27 16:16
 */
@Service
public class RpDataServiceImpl implements RpDataService {

    @Autowired
    private RpDataMapper rpDataMapper;


    @Override
    public List<RpData> selectAllRpDatas() {
        List<RpData> rpData = rpDataMapper.selectByExample(new RpDataExample());
        return rpData;
    }

    /**
     * 添加数据
     * @param rpDatas
     */
    @Override
    public void insertRpdatas(List<RpData> rpDatas){
        for (RpData rpData : rpDatas) {
            rpDataMapper.insert(rpData);
        }

    }
}
